Hi Andrew, That Sequence could be performed in KFLOP as a User Program except there isn't currently a mechanism for changing the Tool Table. I think that could be easily added by adding an addition KFLOP to PC Command Code and functionality. The command would need to cause KMotionCNC to change the tool table with something like: Interpreter->p_setup->tool_table[id].length = length; Interpreter->p_setup->tool_table[id].diameter = diameter; Would you want to change the Tool File on Disk as well? Or just in Memory? Regards TK
Group: DynoMotion |
Message: 8047 |
From: Andrew |
Date: 7/31/2013 |
Subject: Re: Measuring tool Length KmotionCNC |
Hi Tom It would be great if it could be done on disk as well. I built a machine and have it delivered and working at a customer’s place. I am using mach3, but it just randomly does odd things. As I mentioned a week or so ago if I have a macro assigned to a button, if I click a button after a job move, the macro will not run, but if I then press cycle start it will. It also randomly misses lines in macro code. It can run fine all day on a job doing toolchanges, but next day it may decide to stay in G91 mode and not in G90 as commanded in the macro, resulting in a mild disaster. I have never been a huge fan of mach anyway, so I would love to change over to KMotionCNC, if I can get all of my macros working on KmotionCNC. The macros I use all the time are…. measuring and setting my tool heights, Zeroing the job z zero with a touch off plate, and tool changing. Anyway we will see where I get to today, and see if I have any hair left at the end. Best regards Andrew From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On Behalf Of Tom Kerekes Sent: Thursday, 1 August 2013 2:43 AM To: DynoMotion@yahoogroups.com Subject: Re: [DynoMotion] Measuring tool Length KmotionCNC Hi Andrew,
That Sequence could be performed in KFLOP as a User Program except there isn't currently a mechanism for changing the Tool Table.
I think that could be easily added by adding an addition KFLOP to PC Command Code and functionality.
The command would need to cause KMotionCNC to change the tool table with something like:
Interpreter->p_setup->tool_table[id].length = length; Interpreter->p_setup->tool_table[id].diameter = diameter;
Would you want to change the Tool File on Disk as well? Or just in Memory?
Regards TK Hi Guys I am just playing around with KMotionCNC, in a bid to do away with Mach3. Is there a way of measuring a tool length and saving the recorded tool length into the tool table? My flow of events will be: 1. With no tool fitted to the spindle, lower it onto my touchoff plate. 2. Record this x,y and z position. 3. Do a auto toolchange 4. Come back to the x and y position as recorded in step 2. 5. Lower the tool onto the touchoff plate. 6. record position 7. load the difference between zpos in step 2, and zpos in step 6 into the tool table.
Thanks for your help. Andrew
|
|
Group: DynoMotion |
Message: 8052 |
From: Tom Kerekes |
Date: 7/31/2013 |
Subject: Re: Measuring tool Length KmotionCNC |
Hi Andrew,
Here is a patch that should allow you to do it:
http://www.dynomotion.com/Software/Patch/ChangeToolTableV431i/
New functionality is added to KMotionCNC.exe to receive the commands to read and write Tool Lengths
(the 3 changed source files are included in the patch if you need them)
The new common command codes definitions have been added to PC-DSP.h (copy to the DSP_KFLOP directory so they are defined for KFLOP User Programs)
Two KFLOP examples were added that Get and Set a Tool Length.
Note: KFLOP Tool indexes begin with 0, but GCode begins with 1
Basically from KFLOP code:
// Change Tool #3 Length to 12.34 passed up via persist double #16 pD[16]=12.34;
SetToolLength(3-1,16);
Which uses helper function:
// Change a Tool Length offset, value to be passed up is at specified persist offset int SetToolLength(int index, int poff) { persist.UserData[PC_COMM_PERSIST+2] = poff; // persist
offset (doubles) return DoPCInt(PC_COMM_SET_TOOLTABLE_LENGTH,index); // Tool index and Cmd }
I tested by assigning TestChangeToolOffset.c to M100 and it seemed to change the tool length on the fly and work correctly with:
M100 (change the tool offset) G43 H3 (Tool #3 length comp On)
HTH regards TK
Group: DynoMotion |
Message: 8053 |
From: Andrew |
Date: 7/31/2013 |
Subject: Re: Measuring tool Length KmotionCNC |
Hi Tom Thanks a lot. I will try it and let you know how it goes. Regards Andrew From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On Behalf Of Tom Kerekes Sent: Thursday, 1 August 2013 11:18 AM To: DynoMotion@yahoogroups.com Subject: Re: [DynoMotion] Measuring tool Length KmotionCNC Here is a patch that should allow you to do it: http://www.dynomotion.com/Software/Patch/ChangeToolTableV431i/ New functionality is added to KMotionCNC.exe to receive the commands to read and write Tool Lengths (the 3 changed source files are included in the patch if you need them) The new common command codes definitions have been added to PC-DSP.h (copy to the DSP_KFLOP directory so they are defined for KFLOP User Programs) Two KFLOP examples were added that Get and Set a Tool Length. Note: KFLOP Tool indexes begin with 0, but GCode begins with 1 Basically from KFLOP code: // Change Tool #3 Length to 12.34 passed up via persist double #16 pD[16]=12.34; SetToolLength(3-1,16); Which uses helper function: // Change a Tool Length offset, value to be passed up is at specified persist offset int SetToolLength(int index, int poff) { persist.UserData[PC_COMM_PERSIST+2] = poff; // persist offset (doubles) return DoPCInt(PC_COMM_SET_TOOLTABLE_LENGTH,index); // Tool index and Cmd } I tested by assigning TestChangeToolOffset.c to M100 and it seemed to change the tool length on the fly and work correctly with: M100 (change the tool offset) G43 H3 (Tool #3 length comp On)
From: Andrew <andrew@...> To: DynoMotion@yahoogroups.com Sent: Wednesday, July 31, 2013 2:57 PM Subject: RE: [DynoMotion] Measuring tool Length KmotionCNC It would be great if it could be done on disk as well. I built a machine and have it delivered and working at a customer’s place. I am using mach3, but it just randomly does odd things. As I mentioned a week or so ago if I have a macro assigned to a button, if I click a button after a job move, the macro will not run, but if I then press cycle start it will. It also randomly misses lines in macro code. It can run fine all day on a job doing toolchanges, but next day it may decide to stay in G91 mode and not in G90 as commanded in the macro, resulting in a mild disaster. I have never been a huge fan of mach anyway, so I would love to change over to KMotionCNC, if I can get all of my macros working on KmotionCNC. The macros I use all the time are…. measuring and setting my tool heights, Zeroing the job z zero with a touch off plate, and tool changing. Anyway we will see where I get to today, and see if I have any hair left at the end. From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On Behalf Of Tom Kerekes Sent: Thursday, 1 August 2013 2:43 AM To: DynoMotion@yahoogroups.com Subject: Re: [DynoMotion] Measuring tool Length KmotionCNC Hi Andrew,
That Sequence could be performed in KFLOP as a User Program except there isn't currently a mechanism for changing the Tool Table.
I think that could be easily added by adding an addition KFLOP to PC Command Code and functionality.
The command would need to cause KMotionCNC to change the tool table with something like:
Interpreter->p_setup->tool_table[id].length = length; Interpreter->p_setup->tool_table[id].diameter = diameter;
Would you want to change the Tool File on Disk as well? Or just in Memory?
Regards TK Hi Guys I am just playing around with KMotionCNC, in a bid to do away with Mach3. Is there a way of measuring a tool length and saving the recorded tool length into the tool table? My flow of events will be: 1. With no tool fitted to the spindle, lower it onto my touchoff plate. 2. Record this x,y and z position. 3. Do a auto toolchange 4. Come back to the x and y position as recorded in step 2. 5. Lower the tool onto the touchoff plate. 6. record position 7. load the difference between zpos in step 2, and zpos in step 6 into the tool table.
Thanks for your help. Andrew
|
|
| | | |